package com.cloudfun.campusshare.device.protocol.decoder;


import java.util.function.BiConsumer;

/**
 * Created by Huqin on 2020/1/3
 */
public abstract class SingleValueFieldDecoder<T,V> extends AbstractFieldDecoder<T> {

    private final BiConsumer<T, V> fieldSetter;

    public SingleValueFieldDecoder(int start, int length,BiConsumer<T, V> fieldSetter) {
        super(start, length);
        this.fieldSetter = fieldSetter;
    }

    public BiConsumer<T, V> getFieldSetter() {
        return fieldSetter;
    }
}
